import React from 'react'
import {Radio} from 'antd'

const RadioGroup = Radio.Group

class RadioGroupWrap extends React.Component {
  render () {
    let {list, onChange} = this.props
    return <RadioGroup onChange={onChange}>
      {list && list.map(item => {
        return <div key={item.id}>
          <Radio
            value={item.id}>
            {item.name}
          </Radio>
        </div>
      })}
    </RadioGroup>
  }
}

export default RadioGroupWrap
